//
// Created by youkn on 25-4-10.
//

#ifndef ACTIONKEY_H
#define ACTIONKEY_H
#include <string>
#include <unordered_map>
#include <QString>

namespace SS {
    class ActionKey {
    public:
        enum class Keys{
            ITEMS,
            MAKE_A_TEAM,
            TASKS,
            SHOPPING_MALL,
            RESET_THE_NUMBER_OF_ROUNDS,
            F1,
            F2,
            F3,
            F4,
            F5,
            F6,
            F7,
            F8,
            SCHEDULE,
            CHATS,
            PORTRAIT,
        };

         static QString getKeyString(Keys key) {
             auto pairs = getkeyMap();
             auto it = pairs.find(key);
             if (it != pairs.end()) {
                return it->second;
             }
            return "";
        }

    private:
        static std::unordered_map<Keys, QString> getkeyMap() {
            static const std::unordered_map<Keys, QString> keyMap = {
                {Keys::ITEMS, "{ALT down}e{ALT up}"},
                {Keys::MAKE_A_TEAM, "{ALT down}t{ALT up}"},
                {Keys::TASKS, "{ALT down}q{ALT up}"},
                {Keys::SHOPPING_MALL, "{ALT down}i{ALT up}"},
                {Keys::RESET_THE_NUMBER_OF_ROUNDS, "{CTRL down}a{CTRL up}"},
                {Keys::F1, "{F1}"},
                {Keys::F2, "{F2}"},
                {Keys::F3, "{F3}"},
                {Keys::F4, "{F4}"},
                {Keys::F5, "{F5}"},
                {Keys::F6, "{F6}"},
                {Keys::F7, "{F7}"},
                {Keys::F8, "{F8}"},
                {Keys::CHATS, "{CTRL down}f{CTRL up}"},
                {Keys::SCHEDULE, "{ALT down}y{ALT up}"},
                {Keys::PORTRAIT, "{ALT down}w{ALT up}"},
                {Keys::F1, "{F1}"},
            };
            return keyMap;
        }

    };
}





#endif //ACTIONKEY_H
